--- %%NOBANNER%% -->
![]() | ![]() |
/*-------------------<---Start of Description-->---------------------\ | Use to keep a record of the text color of the current document. | |---------------------<---End of Description-->----------------------| |--------------------------------------------------------------------| |------------<---Start of Files or Arguments Needed-->---------------| | Argument: the name of a color you want to write to the word | | document; | |-------------<---End of Files or Arguments Needed-->----------------| |------------------<---Start of Files Created-->---------------------| | The current color to the text in the word document will be | | translated into a color integer and saved into a global variable | | named color_init; | \-------------------<---End of Files Created-->---------------------*/ %MACRO colorint(color) ; /*--------------------------------------------\ | Author: Duo Zhou; | | Created: 6-19-2001 8:51pm; | | Purpose: Set the color of the document; | \--------------------------------------------*/ %if (%quote(%upcase(&color))= AUTO) %then %do; %let color_int=0; %end; %else %if (%quote(%upcase(&color))= BLACK) %then %do; %let color_int=1; %end; %else %if (%quote(%upcase(&color)) = BLUE) %then %do; %let color_int=2; %end; %else %if (%quote(%upcase(&color))= RED) %then %do; %let color_int=6; %end; %else %if (%quote(%upcase(&color))= DKBLUE) OR (%quote(%upcase(%sysfunc(compress(&color)))) = DARKBLUE)%then %do; %let color_int=9; %end; %else %if (%quote(%upcase(&color))= DKBLUE) OR (%quote(%upcase(%sysfunc(compress(&color)))) = DARKBLUE)%then %do; %let color_int=9; %end; %else %if (%quote(%upcase(&color))= DKCYAN) OR (%quote(%upcase(%sysfunc(compress(&color)))) = DARKCYAN)%then %do; %let color_int=10; %end; %else %if (%quote(%upcase(&color))= DKGREEN) OR (%quote(%upcase(%sysfunc(compress(&color)))) = DARKGREEN)%then %do; %let color_int=11; %end; %else %if (%quote(%upcase(&color))= DKRED) OR (%quote(%upcase(%sysfunc(compress(&color)))) = DARKRED)%then %do; %let color_int=13; %end; %else %if (%quote(%upcase(&color))= DKGRAY) OR (%quote(%upcase(%sysfunc(compress(&color)))) = DARKGRAY)%then %do; %let color_int=15; %end; %else %do; %let color_int=0; %end;&color_int %put --> Note: Now the color of the current style if &color, it is &color_int.. ; %MEND colorint;